package com.wantup.controller;

import com.wantup.pojo.ResponseInfo;
import com.wantup.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Zhaoluowei
 * @version 1.0
 * @date 2019/6/17 13:03
 */
@RestController
@RequestMapping(value = "/test")
@Slf4j
public class TestContorller {

    @Autowired
    private UserService userService;

    @RequestMapping(value = "/index")
    public ResponseInfo index() {
        log.info("我是测试方法");
        ResponseInfo responseInfo = new ResponseInfo();
        responseInfo.setCode(0).setMessage("hhhh ").setData("");

        return responseInfo;
    }


    @RequestMapping(value = "/findAll")
    public String findAll() {
        System.out.println("表现层 : 查询所有账户信息 ... ");
        userService.findAllService();

        return "list";
    }


}
